package org.metasketch.diagram.javafx.graphics;

import org.metasketch.editor.links.LineEnd;
import org.metasketch.editor.links.LinkEndType;

import javafx.scene.shape.Rectangle;

public class SquareEndType extends LineEnd {

	Rectangle rect = new Rectangle(10, 10);

	public SquareEndType(LinkEndType endType) {

		if (endType == LinkEndType.SQUARE) {
			rect.setStyle("-fx-stroke: black;  -fx-stroke-width: 2; -fx-fill: white; ");
		} else if (endType == LinkEndType.FILLEDSQUARE)
			rect.setStyle("-fx-stroke: black;  -fx-stroke-width: 2; -fx-fill: black; ");

		getChildren().add(rect);

	}

	// @Override
	// public void setNewPosition(int x, int y) {
	// setTranslateX(x);
	// setTranslateY(y);
	//
	// }

}
